
import axios from 'axios';

const API_BASE_URL = 'http://114.132.177.63'; // 替换为您的后端API基础URL

const api = axios.create({
  baseURL: API_BASE_URL,
  timeout: 10000, // 设置请求超时时间
});

const getwindData = async (params) => {
  try {
    const response = await api.get('/weather/get_wind10m_data/', { params, responseType: 'blob' });
    return response;
  } catch (error) {
    throw error;
  }
};

export { getwindData };